home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / DEMOS / XTREME1 / !Xtreme / Resources / DSym_Info < prev    next >
Text File  |  1995-11-04  |  55KB  |  1,232 lines

  1. Digital Symphony revisions:
  2. ===========================
  3. 1) 12 Mar 1993 (DS 1.20, DSymPlay 1.01)
  4.    ------------------------------------
  5.    Filetypes SySample and Symphony are now able to store 8-bit linear sample
  6.    data.
  7.  
  8. 2) 30 Mar 1994 (DS 1.30, DSymPlay 1.30)
  9.    ------------------------------------
  10.    Filetypes SySample and Symphony are now able to store 16-bit linear sample
  11.    data.
  12.    New compression scheme introduced.
  13.    We now play tunes at nearly exactly the speed an Am*ga does.
  14.  
  15. Latest versions:
  16. ================
  17. DSym_Play module: 1.30
  18. Digital Symphony: 1.30
  19. Symphony file: 1 (from DS 1.30 on)
  20. SySample file: 1 (from DS 1.30 on)
  21. Patterns file: 0
  22.  
  23. Major changes in DSymPlay from version 1.10 on:
  24. ===============================================
  25. - Dynamic choice of the fastest routine given the processor (ARM 2 or 3).
  26. - The load routine didn't release the unpacking buffer (32K) after
  27.   loading a packed song. Works now.
  28. - Changed the specs of the CutNote SWI, sorry!
  29.  
  30.  
  31.  
  32. This file contains two main parts:
  33. ==================================
  34.  
  35.    I. Effects commands and music files formats.
  36.   II. SWI's and commands of the Digital Symphony players.
  37.  
  38.  
  39.    ======================================================================
  40.    PART I : Effect commands and music file formats of some music programs
  41.    ======================================================================
  42.  
  43. 1.1. Amiga ProTracker V1.1B Effect Commands
  44.      --------------------------------------
  45.      (x-y,z) indicates z is done if value not in the range x to y.
  46.      <command number in hex> <effect value in hex>
  47.  
  48.      0 xy Normal play or Arpeggio.
  49.           x: first halfnote to add to pitch
  50.           y: second halftone to add to pitch
  51.  
  52.      1 xx Slide Up.
  53.           xx: pitch increase step
  54.  
  55.      2 xx Slide Down.
  56.           xx: pitch decrease step
  57.  
  58.      3 xx Tone Portamento. 
  59.           xx: pitch slide speed (0 for previous speed)
  60.  
  61.      4 xy Vibrato.
  62.           x: pitch change speed (0 for previous speed)
  63.           y: pitch change depth (0 for previous depth)
  64.  
  65.      5 xy Tone Portamento + Volume Slide.
  66.           x: volume increase step (priority)
  67.           y: volume decrease step
  68.  
  69.      6 xy Vibrato + Volume Slide.
  70.           x: volume increase step (priority)
  71.           y: volume decrease step
  72.  
  73.      7 xy Tremolo.
  74.           x: volume change speed (0 for previous speed)
  75.           y: volume change depth (0 for previous depth)
  76.  
  77.      8 xx Not used.
  78.  
  79.      9 xx Set Sample Offset.
  80.           xx: offset in sample DIV 256 (loop restarted if illegal)
  81.               0 for previous offset
  82.  
  83.      A xy Volume Slide.
  84.           x: volume increase step (priority)
  85.           y: volume decrease step
  86.  
  87.      B xx Position Jump.
  88.           xx: song position (0-127, masked, 0 if illegal)
  89.  
  90.      C xx Set Volume.
  91.           xx: volume (0-64,rounded). Linear.
  92.  
  93.      D xy Pattern Break.
  94.           10*x+y: position to jump to in next pattern (0-63, 0)
  95.  
  96.      E 0x Set Filter.
  97.           x: filter on (0) or filter off (1) (or power LED on/off)
  98.  
  99.      E 1x Fine Slide Up.
  100.           x: value to add to pitch
  101.  
  102.      E 2x Fine Slide Down.
  103.           x: value to subtract from pitch
  104.  
  105.      E 3x Glissando Control.
  106.           x: on (1) or off (0) (use with Tone Portamento)
  107.           When off, the slide is smooth else from halfnote to halfnote
  108.  
  109.      E 4x Set Vibrato Waveform.
  110.           x: sine (0), ramp down (1), square (2)
  111.              bit 2 is off if wave form has to be restarted each note
  112.  
  113.      E 5x Set Fine Tune.
  114.           x: new fine tune value
  115.  
  116.      E 6x Jump to Loop.
  117.           x: jump to loop, play x times
  118.              if 0, the loop start is set to the current pattern position
  119.  
  120.      E 7x Set Tremolo Waveform.
  121.           x: sine (0), ramp down (1), square (2)
  122.              bit 2 is off if wave form has to be restarted each note
  123.  
  124.      E 8x Not used.
  125.  
  126.      E 9x Retrig Note.
  127.           x: retrig note each x vblanks
  128.  
  129.      E Ax Fine Volume Slide Up.
  130.           x: value to add to volume
  131.  
  132.      E Bx Fine Volume Slide Down.
  133.           x: value to subtract from volume
  134.  
  135.      E Cx Note Cut.
  136.           x: cut note after x vblanks (volume is only set to 0)
  137.  
  138.      E Dx Note Delay.
  139.           x: number of vblanks for note delay
  140.  
  141.      E Ex Pattern Delay.
  142.           x: delay pattern x notes
  143.  
  144.      E Fx Invert Loop.
  145.           x: speed
  146.              if 0, it's turned off
  147.           Care must be taken using it: it inverts the sign of sample data
  148.           inside sample loop, one byte each vblank
  149.  
  150.      F xx Set Speed.
  151.           In CIA mode (recommended and most usual):
  152.               xx: speed (1-31,ignored) or tempo (32-255)
  153.                   Tempo unit: 1/24th vblanks per minute (defaults to 125)
  154.           In VBlank mode:
  155.               xx: speed (1-255)
  156.  
  157. 1.2. Archimedes Tracker V1.0+++ Effect Commands
  158.      ------------------------------------------                    
  159.      (x-y,z) indicates z is done if value not in the range x to y.
  160.      <command character> <command number in hex> <effect value in hex>
  161.  
  162.      0 00 xy Normal play or Arpeggio.
  163.              x: first halfnote to add
  164.              y: second halftone to subtract
  165.  
  166.      1 01 xx Slide Up.
  167.              xx: pitch increase step (4 bits?)
  168.  
  169.      2 02 xx Slide Down.
  170.              xx: pitch decrease step (4 bits?)
  171.                                          
  172.      B 0B xx Break Pattern.
  173.  
  174.      E 0E xy Set Stereo.
  175.              y: stereo position (1-7,ignored). 1=left 4=center 7=right
  176.              
  177.      G 10 xx Volume Slide Up.
  178.              xx: speed (4 bits?)
  179.  
  180.      H 11 xx Volume Slide Down.
  181.              xx: speed (4 bits?)
  182.  
  183.      J 13 xx Position Jump.
  184.              xx: song position (0-127,masked)
  185.  
  186.      L 15 xy Line Jump. (not in manual)
  187.              Jump to line 10*x+y in same pattern. (10*x+y>63 ignored)
  188.  
  189.      S 1C xy Set Speed.
  190.              y: speed (1-15,ignored)
  191.  
  192.      V 1F xx Set Volume.
  193.              xx: volume (0-255). Logarithmic.
  194.  
  195. 1.3. Archimedes Symphony V1.00 Effect Commands
  196.      -----------------------------------------
  197.      (x-y,z) indicates z is done if value not in the range x to y.
  198.      <command number in hex> <effect value in hex>
  199.  
  200.      00 xyz Normal play or Arpeggio + Volume Slide Up.
  201.             x: volume increase step
  202.             y: first halfnote to add
  203.             z: second halftone to add
  204.  
  205.      01 xyy Slide Up + Volume Slide Up.
  206.             x: volume increase step
  207.             yy: pitch increase step
  208.  
  209.      02 xyy Slide Down + Volume Slide Up.
  210.             x: volume increase step
  211.             yy: pitch decrease step
  212.  
  213.      03 xyy Tone Portamento. 
  214.             yy: pitch slide speed (0 for previous speed)
  215.  
  216.      04 xyz Vibrato.
  217.             y: pitch change speed (0 for previous speed)
  218.             z: pitch change depth (0 for previous depth)
  219.  
  220.      05 xyz Tone Portamento + Volume Slide.
  221.             y: volume increase step (priority)
  222.             z: volume decrease step
  223.  
  224.      06 xyz Vibrato + Volume Slide.
  225.             y: volume increase step (priority)
  226.             z: volume decrease step
  227.  
  228.      07 xyz Tremolo.
  229.             y: volume change speed (0 for previous speed)
  230.             z: volume change depth (0 for previous depth)
  231.  
  232.      09 xxx Set Sample Offset.
  233.             xxx: offset in sample DIV 128 (loop restarted if illegal)
  234.                  0 for previous offset
  235.  
  236.      0A xyz Volume Slide + Fine Slide Up.
  237.             x: value to add to pitch
  238.             y: volume increase step (priority)
  239.             z: volume decrease step
  240.  
  241.      0B xxx Position Jump.
  242.             xxx: song position (0 if illegal)
  243.  
  244.      0C xyy Set Volume.
  245.             yy: volume (0-64,rounded). Linear.
  246.  
  247.      0D xyy Pattern Break.
  248.             yy: break position in next pattern (0-63, 0)
  249.  
  250.      0E xxx Not used.
  251.  
  252.      0F xxx Set Speed.
  253.             xxx: speed (1-4095,ignored). Default is 6
  254.  
  255.      10 xxy Filter Control. (Not implemented)
  256.             y: filter on (0) or filter off (1)
  257.  
  258.      11 xyy Fine Slide Up + Fine Volume Slide Up.
  259.             x: value to add to volume
  260.             yy: value to add to pitch
  261.  
  262.      12 xyy Fine Slide Down + Fine Volume Slide Up.
  263.             x: value to add to volume
  264.             yy: value to subtract from pitch
  265.  
  266.      13 xxy Glissando Control.
  267.             y: on (1) or off (0) (use with Tone Portamento)
  268.             When off, the slide is smooth else from halfnote to halfnote
  269.  
  270.      14 xxy Set Vibrato Waveform.
  271.             y: sine (0), ramp down (1), square (2)
  272.                bit 2 is off if wave form has to be restarted each note
  273.  
  274.      15 xxy Set Fine Tune.
  275.             y: new fine tune value
  276.  
  277.      16 xxx Jump to Loop.
  278.             xxx: jump to loop, play xxx times
  279.                  if 0, the loop start is set to the current pattern position
  280.  
  281.      17 xxy Set Tremolo Waveform.
  282.             y: sine (0), ramp down (1), square (2)
  283.                bit 2 is off if wave form has to be restarted each note
  284.  
  285.      19 xxx Retrig Note.
  286.             xxx: retrig note each xxx vblanks
  287.  
  288.      1A xyy Fine Slide Up + Fine Volume Slide Down.
  289.             x: value to subtract from volume
  290.             yy: value to add to pitch
  291.  
  292.      1B xyy Fine Slide Down + Fine Volume Slide Down.
  293.             x: value to subtract from volume
  294.             yy: value to subtract from pitch
  295.  
  296.      1C xxx Note Cut.
  297.             xxx: cut note after xxx vblanks (volume is only set to 0)
  298.  
  299.      1D xxx Note Delay.
  300.             xxx: number of vblanks for note delay
  301.  
  302.      1E xxx Pattern Delay.
  303.             xxx: delay pattern xxx notes
  304.  
  305.      1F xxy Invert Loop.
  306.             y: speed
  307.                if 0, it's turned off
  308.                Care must be taken using it: it inverts the sign of sample
  309.                data inside sample loop, one byte each vblank
  310.  
  311.      20 xyz Normal play or Arpeggio + Volume Slide Down.
  312.             x: volume decrease step
  313.             y: first halfnote to add
  314.             z: second halftone to add
  315.  
  316.      21 xyy Slide Up + Volume Slide Down.
  317.             x: volume decrease step
  318.             yy: pitch increase step
  319.  
  320.      22 xyy Slide Down + Volume Slide Down.
  321.             x: volume decrease step
  322.             yy: pitch decrease step
  323.  
  324.      2A xyz Volume Slide + Fine Slide Down.
  325.             x: value to subtract from pitch
  326.             y: volume increase step (priority)
  327.             z: volume decrease step
  328.  
  329.      2B xyy Line Jump.
  330.             yy: Line to jump to in same pattern. (0-63, 0)
  331.  
  332.      2F xxx Set Tempo.
  333.             xxx: new tempo value (1-4095,ignored).
  334.                  Unit: 1/20th vblanks per second (defaults to 1000)
  335.  
  336.      30 xxy Set Stereo.
  337.             if y and 7 =0 then xx = stereo position (0-127 is 0 to 127,
  338.                                     129-255 is -1 to -127, 128 ignored)
  339.             if y and 7 >0 then y = stereo position (1-7,ignored).
  340.                                1=left 4=center 7=right
  341.  
  342.      31 xxx Song Upcall.
  343.             The CPU performs a linked branch to the song upcall vector.
  344.             The routine can corrupt all registers and must preserve SVC mode
  345.             on return using MOVS PC,R14
  346.             On entry registers contain the following:
  347.             R0= xxx parameter
  348.             R4= full note address + 4
  349.             R5= voice number (0 to 7)
  350.  
  351.      32 xxx Unset Sample Repeat.
  352.             The sample contines to be played until it ends, but without loops
  353.  
  354. 2.1. Amiga ProTracker V1.1B Song/Module Format (Filetype &001)
  355.      ---------------------------------------------------------
  356.      Rem: files handled by Amiga ProTracker, NoiseTracker, SoundTracker,
  357.           IntuiTracker, ...
  358.  
  359.      Offset  Bytes  Description
  360.      ------  -----  -----------
  361.         0     20    Songname. Trailing null bytes at the end.
  362.  
  363.      Information for sample 1-31:
  364.  
  365.      Offset  Bytes  Description
  366.      ------  -----  -----------
  367.        20     22    Samplename. Pad with null bytes.
  368.        42      2    Length DIV 2. 
  369.        44      1    Lower four bits: finetune value (signed 4 bits)
  370.                     Upper four bits: not used (should be 0).
  371.        45      1    Volume for sample 1. Range is &00-&40 (0-64).
  372.        46      2    Repeat offset DIV 2.
  373.        48      2    Repeat length DIV 2.
  374.  
  375.      Information for the next 30 samples starts here. It's just like the
  376.      info for sample 1.
  377.  
  378.      Offset  Bytes  Description
  379.      ------  -----  -----------
  380.        50     30    Sample 2...
  381.        80     30    Sample 3...
  382.         .
  383.         .
  384.         .
  385.       890     30    Sample 30...
  386.       920     30    Sample 31...
  387.  
  388.      Offset  Bytes  Description
  389.      ------  -----  -----------
  390.       950      1    Songlength (1-128).
  391.       951      1    Well... this little byte here is set to 127, so that old
  392.                     trackers will search through all patterns when loading.
  393.                     NoiseTracker uses this byte for restart, but we don't.
  394.       952    128    Song positions 0-127. Each hold a number from 0-63 that
  395.                     tells the tracker what pattern to play at that position.
  396.      1080      4    The four letters "M.K." - This is something
  397.                     Mahoney & Kaktus inserted when they increased the number
  398.                     of samples from 15 to 31. If it's not there, the
  399.                     module/song uses 15 samples or the text has been removed
  400.                     to make the module harder to rip. Startrekker puts
  401.                     "FLT4" or "FLT8" there instead. "M&K!" may be present,
  402.                     too.
  403.  
  404.      Offset  Bytes  Description
  405.      ------  -----  -----------
  406.      1084    1024   Data for pattern 00.
  407.         .
  408.         .
  409.         .
  410.      xxxx  Number of patterns stored is equal to the highest pattern number
  411.            in the song position table (at offset 952-1079).
  412.  
  413.      Each note is stored as 4 bytes, and all four notes at each position in
  414.      the pattern are stored after each other.
  415.  
  416.      Position          Notes data
  417.      -------- ------------------------------ 
  418.         00    chan 1  chan 2  chan 3  chan 4
  419.         01    chan 1  chan 2  chan 3  chan 4
  420.         02    chan 1  chan 2  chan 3  chan 4
  421.        etc.
  422.  
  423.      Info for each note:
  424.      -------------------      
  425.      bits 24-31: effect value (0-255).
  426.           20-23: lower 4 bits of sample number (0-15).
  427.           16-19: effect command number (0-15).
  428.            8-15: lower 8 bits of note period (0-255).
  429.            4- 7: upper 4 bits of sample number (0-1).
  430.            0- 3: higher 4 bits of note period (0-3).
  431.  
  432.      Period table for Tuning 0, normal:
  433.      ----------------------------------
  434.        C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
  435.        C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
  436.        C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
  437.  
  438.      To determine what note to show, scan through the table until you find
  439.      the same period as the one in the note. Use the index to look up in
  440.      a notenames table.
  441.  
  442.      This is the data stored in a normal song. A packed song starts with the
  443.      four letters "PACK".
  444.  
  445.      In a module, all the samples are stored right after the pattern data.
  446.      To determine where a sample starts and stops, you use the sample info
  447.      structures in the beginning of the file (from offset 20). Their format
  448.      is linear signed.
  449.  
  450.      ProTracker CIA (Complex Interface Adapter) Timer Tempo Calculations
  451.                                       AMIGA
  452.      -------------------------------------------------------------------
  453.      Fcolor                        = 4.43361825 MHz (PAL color carrier freq)
  454.      CPU Clock   = Fcolor * 1.6    = 7.0937892  MHz
  455.      CIA Clock   = CPU Clock / 10  = 709.37892  kHz
  456.      50 Hz Timer = CIA Clock / 50  = 14187.5784
  457.      Tempo num.  = 50 Hz Timer*125 = 1773447
  458.  
  459.      For NTSC: CPU Clock = 7.1590905 MHz --> Tempo num. = 1789773
  460.  
  461.       To calculate tempo we use the formula: TimerValue = 1773447 / Tempo
  462.       The timer is only a word, so the available tempo range is 28-255 (++).
  463.       Tempo 125 will give a normal 50 Hz timer (VBlank).
  464.  
  465.       A normal ProTracker VBlank song tempo can be calculated as follows:
  466.       We want to know the tempo in BPM (Beats Per Minute), or rather quarter-
  467.       notes per minute. Four notes makes up a quarternote.
  468.       First find interrupts per minute: 60 seconds * 50 per second = 3000
  469.       Divide by interrupts per quarter note = 4 notes * speed
  470.       This gives: Tempo = 3000/(4*speed)
  471.       Simplified: Tempo = 750/speed
  472.       For a normal song in speed 6 this formula gives: 750/6 = 125 BPM
  473.       
  474.       Note: The mentioned 50 Hz quantities are rather inaccurate since the
  475.             vblank frequency is exactly 49.9 Hz!
  476.  
  477. 2.2. Archimedes Tracker V1.0+++ File Formats
  478.      ---------------------------------------
  479.      
  480.      Sample chunk format
  481.      -------------------
  482.      This is the component of a Tracker sample file (Filetype &CB5).
  483.      
  484.        Field length Contents
  485.        ------------ --------
  486.           4 bytes   The string "SAMP"
  487.           4 bytes   Chunk length (i.e. total size -8)
  488.           4 bytes   The string "SNAM"
  489.           4 bytes   Sample name length (20)
  490.          20 bytes   Sample name padded with zero's
  491.           4 bytes   The string "SVOL"
  492.           4 bytes   Value 4
  493.           4 bytes   Sample volume (0-255). Logarithmic
  494.           4 bytes   The string "SLEN"
  495.           4 bytes   Value 4
  496.           4 bytes   Sample length (multiple of 4 otherwise Tracker crashes!)
  497.           4 bytes   The string "ROFS"
  498.           4 bytes   Value 4
  499.           4 bytes   Repeat offset
  500.           4 bytes   The string "RLEN"
  501.           4 bytes   Value 4
  502.           4 bytes   Repeat length
  503.           4 bytes   The string "SDAT"
  504.           4 bytes   Sample length (multiple of 4): xx
  505.          xx bytes   Sample data in logarithmic format
  506.  
  507.        Note: the manual states that not all sub-chunks may be present. But
  508.              until now they've always been there.
  509.  
  510.      Pattern chunk format
  511.      --------------------
  512.      This is the component of a Tracker pattern file (Filetype &FF1).
  513.      
  514.        Field length Contents
  515.        ------------ --------
  516.           4 bytes   The string "PATT"
  517.           4 bytes   Chunk length (i.e. number of voices * 256 - the manual
  518.                     says it's always 2048, that's false! ): xx
  519.          xx bytes   Notes
  520.  
  521.          Each note is stored as 4 bytes, and all x notes at each position in
  522.          the pattern are stored after each other.
  523.      
  524.          Position         Notes data
  525.          -------- ---------------------------
  526.             00    chan 1  chan 2  ...  chan x
  527.             01    chan 1  chan 2  ...  chan x
  528.             02    chan 1  chan 2  ...  chan x
  529.            etc.
  530.  
  531.          Info for each note:
  532.          -------------------      
  533.          bits 24-31: note number (0-36).
  534.               16-23: sample number (0-36).
  535.                8-15: effect command number.
  536.                0- 7: effect value (0-255).
  537.      
  538.          Note numbers table:
  539.          -------------------
  540.            C-1 to B-1 : 01 to 12
  541.            C-2 to B-2 : 13 to 24
  542.            C-3 to B-3 : 25 to 36
  543.  
  544.      Module format
  545.      -------------
  546.      This is the format of a Tracker module file (Filetype &CB6).
  547.      
  548.        Field length Contents
  549.        ------------ --------
  550.           4 bytes   The string "MUSX"
  551.           4 bytes   Chunk length (i.e. total size -8)
  552.           4 bytes   The string "TINF"
  553.           4 bytes   Value 4
  554.           4 bytes   Date of version in BCD format: YYYYMMDD (bytes 1 to 4)
  555.           4 bytes   The string "MVOX"
  556.           4 bytes   Value 4
  557.           4 bytes   Number of voices (1-8)
  558.           4 bytes   The string "STER"
  559.           4 bytes   Value 8
  560.           8 bytes   Default stereo positions for 8 channels. See the command.
  561.           4 bytes   The string "MNAM"
  562.           4 bytes   Tune name length (32)
  563.          32 bytes   Tune name padded with zero's
  564.           4 bytes   the string "ANAM"
  565.           4 bytes   Author name length (32)
  566.          32 bytes   Author name padded with zero's
  567.           4 bytes   the string "MLEN"
  568.           4 bytes   Value 4
  569.           4 bytes   Tune length (1-128)
  570.           4 bytes   the string "PNUM"
  571.           4 bytes   Value 4
  572.           4 bytes   Number of defined patterns (1-64)
  573.           4 bytes   the string "PLEN"
  574.           4 bytes   Value 64
  575.          64 bytes   Length of each pattern (0-64)
  576.           4 bytes   the string "SEQU"
  577.           4 bytes   Value 128
  578.         128 bytes   pattern number to be played at each position (0-63)
  579.  
  580.        This is followed by a pattern chunk for each defined pattern.
  581.        After that, there is a sample chunk for each of the 36 samples.
  582.  
  583.        Note that such a file can contain more than one module (MUSX chunk)
  584.        but practically it's very rare and not easy to handle...
  585.  
  586.        Such a format for a music module is a bit silly since nearly all
  587.        chunks have a constant length.
  588.    
  589. 2.3. Archimedes Symphony Module/Song Format
  590.      --------------------------------------
  591.      Such tunes are composed of a list of positions which refer to the
  592.      pattern that has to be played through a given channel at that song
  593.      position. It's possible to play nothing instead of a pattern.
  594.  
  595.      The ranges are as follows:
  596.      --------------------------
  597.      Voices: 1 to 8
  598.      Tune length: 0 to 4096 (&1000)
  599.      Pattern number: 0 to 4095 (&FFF)
  600.      
  601.      A pattern is composed of 64 notes.
  602.  
  603.      Each note is stored as 4 bytes (A 32 bit-word), and of course all notes
  604.      are stored after each other.
  605.  
  606.      Position Notes data
  607.      -------- ----------
  608.         00      chan i
  609.         01      chan i
  610.         02      chan i
  611.        etc.
  612.      
  613.      Info for each note:
  614.      -------------------
  615.      bits 20-31: effect value (0-4095).
  616.           14-19: effect command number (0-63).
  617.           13-13: not used for now (should be 0).
  618.            6-12: sample number (0-63).
  619.            0- 5: note number (0-36).
  620.  
  621.      Note numbers table:
  622.      -------------------
  623.        C-1 to B-1 : 01 to 12
  624.        C-2 to B-2 : 13 to 24
  625.        C-3 to B-3 : 25 to 36
  626.  
  627.      Note: the use of [x,y] in the following specs refers to the revision
  628.            number x and file version y in which the feature first appeared
  629.            (see top of this file)
  630.      Note2: Any program that would like to read Symphony files should test
  631.             the version number and give an error if greater or equal to 10.
  632.             The difference between version 0 and 1 is that a version 1 file
  633.             COULD use the new packing methods as standard. So read the file
  634.             and check if you know the packing methods used.
  635.      Note3: You may notice that the space taken by a soundtrack can be
  636.             computed without reading the whole file.
  637.  
  638.      Sample file format (Filetype &10A: SySample)
  639.      --------------------------------------------
  640.        Field length Contents
  641.        ------------ --------
  642.           8 bytes   The string "BASSSAMP". Byte value= ASCII code - 64
  643.           1 byte    Version number (currently 1)
  644.           1 byte    Name length: xx
  645.          xx bytes   Name
  646.           3 bytes   Length DIV 2 (length= number of samples, not bytes)
  647.           3 bytes   Repeat offset DIV 2
  648.           3 bytes   Repeat length DIV 2
  649.           1 byte    Packing method
  650.          sy bytes   Data:
  651.                     Packing=0 : 8-bit logarithmic (sy=length)
  652.                     Packing=1 : 13-bit LZW applied to linear sample data
  653.                                 differences (sy multiple of 4)
  654.                     Packing=2 : 8-bit linear signed (sy=length)       [1,0]
  655.                     Packing=3 : 16-bit linear signed (sy=length*2)    [2,1]
  656.                                 (little endian)
  657.                     Packing=4 : SigmaDelta compression applied to     [2,1]
  658.                                 linear sample differences
  659.                     Packing=5 : SigmaDelta compression applied to     [2,1]
  660.                                 logarithmic sample differences
  661.         0-3 bytes   Zero's to fill last file word
  662.  
  663.      Pattern file format (Filetype &FFD: Data)
  664.      -----------------------------------------
  665.        Field length Contents
  666.        ------------ --------
  667.           8 bytes   The string "BASSPTRN". Byte value= ASCII code - 64
  668.           1 byte    Version number (currently 0)
  669.           1 byte    Contents: 0 for a sequence, 1 for some patterns
  670.         0-1 byte    Number of sequence lines (only if Contents=0): z
  671.           2 bytes   Length: number of sequence positions
  672.                     or number of patterns: xx
  673.          yy bytes   Data:
  674.                     Contents=0 : For each line
  675.                                      For xx positions
  676.                                          Pattern number (2 bytes each)
  677.                                  (yy=2*xx*z)
  678.                     Contents=1 : patterns data (yy=256*xx)
  679.  
  680.      Module/Song file format (Filetype &10B: Symphony)
  681.      -------------------------------------------------
  682.        Field length Contents
  683.        ------------ --------
  684.           8 bytes   The string "BASSTRAK". Byte value= ASCII code - 64
  685.           1 byte    Version number (currently 1)
  686.           1 byte    Number of voices (1 to 8): z
  687.           2 bytes   Track length in positions: y (0 to &1000)
  688.           2 bytes   Number of defined patterns: p (0 to &1000)
  689.           3 bytes   Information text length: il
  690.  
  691.           For the 63 samples, we have:
  692.  
  693.        (  1 byte    Sample name length: sn
  694.        (            (bit 7 set if all its data is blanked: lengths, vol, ft)
  695.        (            (bit 6 reserved => mask out to read / write 0)
  696.        (  3 bytes   Sample length DIV 2 (length= number of samples, not bytes)
  697.  
  698.           1 byte    Track name length: x
  699.           x bytes   Track name
  700.           8 bytes   Effects allowed table. 1 bit per effect (0=no, 1=allowed)
  701.       If y>0 then
  702.         ( 1 byte    Packing system for sequence (0= not packed, 1= packed)
  703.         ( s bytes   Sequence data:
  704.         (           Packing=0 : For each position
  705.         (                           For each voice
  706.         (                               Pattern number (2 bytes)
  707.         (                       (s= 2*y*z)
  708.         (           Packing=1 : 13-bit LZW applied to overall sequence data
  709.         (                       (s multiple of 4)
  710.  
  711.       If p>0 then
  712.         ( For each pk-pattern chunk (all 2000 patterns but the last):
  713.         (       1 byte  Packing system for chunk (0= not packed, 1= packed)
  714.         (       b bytes Pattern data:
  715.         (               Packing=0 : For each pattern
  716.         (                             For each pattern position (0 to 63)
  717.         (                               Full note value (1 word)
  718.         (                           (b= 4*64*pk)
  719.         (               Packing=1 : 13-bit LZW applied to chunk data
  720.         (                           (b multiple of 4)
  721.  
  722.           For the 63 samples, we have:
  723.  
  724.        ( sn bytes   Sample name
  725.        (  3 bytes   Sample repeat offset DIV 2
  726.        (  3 bytes   Sample repeat length DIV 2
  727.        (  1 byte    Sample volume (0 to 64)
  728.        (  1 byte    Sample fine tune (-8 to 7)
  729.        (  1 byte    Packing system for sample (see sample file format)
  730.        (
  731.        ( If sample length>0 then
  732.        (   ( sy bytes Data: see sample file format above
  733.  
  734.       If il>0 then
  735.         ( 1 byte    Packing system for information text
  736.         (           (0= not packed, 1= packed)
  737.         ( i bytes   Information text:
  738.         (           Packing=0 : Text (i=il)
  739.         (           Packing=1 : 13-bit LZW applied to information text
  740.         (                       (i multiple of 4)
  741.  
  742.         0-3 bytes   Zero's to fill last file word
  743.  
  744.  
  745.     Notes about compression algorithms:
  746.  
  747.     - Sample differences are computed like this:
  748.       Init: x=0; p=sample start
  749.       Loop: difference= value(p)-x; x= value(p); inc(p)
  750.     - The 13-bit LZW compression scheme uses 256/257 as restart/end code.
  751.       Applied on signed linear sample deltas.
  752.     - The SigmaDelta compression is rather too complex to explain here!
  753.       Applied on unsigned linear or unsigned logarithmic sample deltas.
  754.  
  755.     Maybe next time we'll provide some algorithms...
  756.     
  757.  
  758.         =========================================================
  759.         PART II : Digital Symphony SWI's and commands information
  760.         =========================================================
  761.  
  762. The following explains the functionalities used in the 1 music-player module
  763. (the one generated by the Digital Symphony application) and in the
  764. multi music player module (files DSymPlay and DSymPlayA3). The file DSymPlayA3
  765. only differs from the file DSymPlay in that only the routines used whenever
  766. an ARM3 cache is detected are present in it, so you gain some Kbytes but have
  767. slower routines when used with non-cached processors.
  768.  
  769. THESE MODULES ARE FREEWARE. If you use it in a NON COMMERCIAL program (we
  770.  strongly encourage it) then all we ask is:
  771.   - In all cases, give some credits to BASS for the playroutine.
  772.   - If the play module stays as a stand-alone module in your app directory,
  773.     then include this text file unaltered too.
  774. If you wish to use them in some commercial software then write to the
  775. authors of Digital Symphony or to Oregan Software, wo'll try do find an
  776. agreement. See the end of this file for addresses.
  777.  
  778. Now more technical details.
  779.  
  780. Nearly all SWI's should never be used while interrupting the player routine
  781. (i.e. they're not reentrant). See the SWI that allows to know if the player
  782. routine has been interrupted or not.
  783.  
  784. You can call a SWI via this * command:
  785.  
  786.   *DSym <SWI name> [<R0 value> [<R1 value> [<...>]]]
  787.  
  788.   Of course you can't get results back this way.
  789.   The unspecified values are set to 0 before calling the corresponding SWI.
  790.  
  791.   A value may be:
  792.     - Any string readable by the OS_ReadUnsigned SWI (see the PRM's).
  793.     - The latter string preceeded by the minus sign for a negative number.
  794.   You can specify a pointer to a string (i.e. when a file name is required)
  795.   only for R0 value: just put the string between quotes.
  796.  
  797. Some examples:
  798.   Set the overall volume to 64: *DSym Vol 64
  799.   Load file $.MegaMix: *DSym Load "$.MegaMix"
  800.   Set stereo of channel 2 to -127: *DSym Stereo 2 -&7F
  801.  
  802. Instead of installing the player module in RMA (that requires to ensure
  803. there's enough memory free in RMA, very annoying in demos), you could
  804. directly patch the module into your code. There are 2 ways to do this:
  805.  
  806.  - Link it to modules chain in RMA using OS_Module 10 (See the PRM's). The
  807.    SWI's are always available. Don't forget to kill it before returning to
  808.    desktop!
  809.  
  810.  - Don't link to other modules. The SWI's are not directly available.
  811.    Let's assume ModStart to be the start address of the player module in
  812.    your code. First you must call (ModStart+(ModStart!4)) like RISC OS
  813.    would do when loading a module. Now you can use SWI's by calling a
  814.    special routine with R11 containing the SWI number. For example, set the
  815.    volume to 64 with:
  816.  
  817.                MOV R0,#64        ; SWI parameter
  818.                MOV R11,#2        ; SWI number
  819.                BL  ModStart+44   ; Note: need NOT be in SVC mode
  820.  
  821.    Finally don't forget to call (ModStart+(ModStart!8)) before your
  822.    program exits.
  823.  
  824.  
  825. The advantages of using a generated 1 music-player are as follows:
  826.   - Only the useful routines are included.
  827.   - The tune data is arranged to get more efficient results through
  828.     compaction. In fact, samples are stored as linear deltas.
  829.   - At module's installation, the samples data are scaled to the current
  830.     configured volume of the machine. This gives more chances that the
  831.     efficient sound buffer filling routines in the case of no scaling are
  832.     used. It's of no help if the global volume is not at maximum or a sample
  833.     is not played at full volume.
  834.     WARNING here: when using the SWI InstrData, the newly installed sample
  835.     is scaled too, so avoid calling twice with exactly the same parameters
  836.     without refreshing the real sample data!
  837.  
  838. The SWI's allow you to play tunes in your own programs and making sound
  839. effects. While the tune is playing you can make additional sound effects
  840. (produce 'custom notes') in the same way the tune does. In fact, you could
  841. play a tune by producing notes stored in your own tables.
  842. If you'd like to play your notes while the tune is playing, you can do it
  843. on the voices used by the tune, but with some tunes there can be some clashes
  844. with samples and notes (this is ONLY a matter of nice sound and NOT a matter
  845. of bugged routines). So it's preferable to play them on the free voices
  846. (the ones with the highest numbers). For example, with a tune with 3 rows
  847. in its sequence and 4 configured voices, you could safely play your notes on
  848. the 4th voice.
  849.  
  850. Useful example:
  851. ---------------
  852. Prototype for playing a song in a usual program:
  853.  
  854.     SYS"DSym_Load","<Prog$Dir>.Music" :REM Load song in RMA
  855.     SYS"DSym_RestartSong"             :REM Start playing
  856.     REPEAT
  857.     REM Main loop
  858.     UNTIL exit%
  859.     FOR v%=64 TO 0 STEP -1            :REM Fade out
  860.       SYS"DSym_Vol",v%
  861.       WAIT
  862.     NEXT
  863.     *RMKill DSymphonyPlayer
  864.  
  865. To stop a tune: SYS"DSym_Pause"
  866. To continue after a stop: SYS"DSym_TuneControl",1
  867.  
  868. More technical details:
  869. -----------------------
  870. SWI Chunk name: DSym
  871. SWI Chunk base number: &45880 (allocated from Acorn)
  872.  
  873. Should work on A5000's and some VIDC enhancers (i.e. no pitch bending)
  874. without any additional code. See SWI to set hardware speed.
  875.  
  876. SWI DSym_Load does not work in the 1 music-player.
  877.  
  878. The player can only load Digital Symphony format files. It was designed to
  879. be as 'simple' as possible. It cannot read 16-bit samples.
  880.  
  881. The player does NOT use the VIDC pointer.
  882.  
  883. The player does NOT use WAIT's.
  884.  
  885. The player does use OS_ReadMonotonicTime only:
  886.   - When calling DSym_Configure, DSym_Load or the module finalisation entry.
  887.   - In the buffer filling routine when in 'auto speed' mode (in order to
  888.     'guess' the current VIDC speed) (see SWI HardSpeed)
  889. So let the interrupt for the corresponding timer enabled in those cases.
  890.  
  891. The FillAddress SWI allows you to know the address of the buffer filling
  892. routine (you could get it with Sound_Configure but it's easier here).
  893. If you feel pretty good you could then call it yourself instead of RISC OS
  894. each time a sound interrupt occurs. You must call DSym_Configure at least
  895. once before using the routine.
  896. The specs for the routine:
  897.  
  898.    Entry: R12 points to buffer to fill (word-aligned, length=1664 bytes)
  899.           Processor in IRQ mode
  900.           IRQ disabled
  901.    Exit:  R0-R12,R14 and flags corrupted
  902.           Processor in IRQ mode
  903.           IRQ disabled
  904.           Buffer filled for the number of configured voices (208 bytes/voice)
  905.    The routine enables IRQ's during its work.
  906.  
  907. You are expected to make no mistakes when passing parameters to SWI's. If
  908. you do, it's possible that the machine locks up! (Remember: the player is
  909. powerful but simple)
  910.  
  911. Note: There are two SWI's to set the stereo positions. A front-end
  912.       application that sets the current stereo should set the DEFAULT stereo
  913.       too.
  914. Note2: In the following specs, no reference to a register on exit means
  915.        it is preserved.
  916.  
  917. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  918. SWI name         Nr !Entry                     !Exit/Effect
  919. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  920. Load             00 !R0=-1 to free RMA buffers !If an error occured, then
  921.                     !or R0= 0 to load from     !   R0 points to error        
  922.                     !         memory           !   and V is set,
  923.                     !or R0 points to file name !else
  924.                     !R1= source start address  !   R0= length of track
  925.                     !    (if R0=0)             !       in memory.
  926.                     !R2= 0 to load to RMA      !
  927.                     !or R2= destination start  !
  928.                     !       address            !
  929.                     !R3= size of destination   !
  930.                     !    buffer (if R2<>0)     !
  931.                     !R4= 0 to claim buffer     !
  932.                     !    in RMA                !
  933.                     !or R4= start address of   !
  934.                     !   buffer (32K space)     !
  935.                     !A buffer address is needed only if the Symphony file
  936.                     ! contains some packed data.
  937.                     !Buffers are word aligned.
  938.                     !In the case of packed data, the source and destination
  939.                     ! buffers can't share any part of memory.
  940.                     !In the case of entirely non packed data, the two buffers
  941.                     ! can share a part of memory provided
  942.                     ! destination address <= source address. After the call
  943.                     ! the source data has been altered because the
  944.                     ! module needs to build an internal structure different
  945.                     ! to the source structure.
  946.                     !Although the code is quite optimized, the loading from
  947.                     ! memory may take some time because all the data has to
  948.                     ! be moved in memory. So don't expect loading 50 songs
  949.                     ! per second with an ARM2!
  950. --------------------+--------------------------+-----------------------------
  951. RestartSong      01 ! -                        !Do a ResetParams,
  952.                     !                          !Tune position set to (0,0),
  953.                     !                          !Tune playing again.
  954. --------------------+--------------------------+-----------------------------
  955. Vol              02 !R0= new overall volume    !R0= previous overall volume
  956.                     !    or -1 to read         !    (0-64).
  957.                     !Initial value is 64       !
  958. --------------------+--------------------------+-----------------------------
  959. Stereo           03 !R0= voice number (0-7)    !R1= previous stereo position
  960.                     !R1= new stereo position   !    (-127 to 127) for voice
  961.                     !    or -128 to read       !    number R0.
  962.                     !                          !
  963.                     !Initial values are those of the Amiga.
  964. --------------------+--------------------------+-----------------------------
  965. CutNote          04 !R0= voice number (0-7)    !R1= previous note state on
  966.                     !R1>=0 to read state       !    voice number R0
  967.                     !  < 0 to stop note        !  < 0 -> stopped
  968.                     !                          !  >=0 -> playing, = sample
  969.                     !                          !         start address
  970.                     !                          !If R1>=0 then
  971.                     !                          !  R2= offset in sample
  972.                     !                          !      in 1/(2^12) units
  973. --------------------+--------------------------+-----------------------------
  974. PlayInstrPacked  05 !R0= voice number (0-7)    !The new note is put into the
  975.                     !R1= full note data        !buffer to be played.
  976.                     !R5= minimum sustain time  !Setting a sustain time means
  977.                     !    (in 1/50th sec)       !that the new note has
  978.                     !R6<>0 to wait for buffer  !priority on the tune notes
  979.                     !      empty               !during this time.
  980.                     !      else don't wait     !
  981. --------------------+--------------------------+-----------------------------
  982. PlayInstr        06 !R0= voice number (0-7)    !The new note is put into the
  983.                     !R1= note number (0-36)    !buffer to be played.
  984.                     !R2= sample number (0-63)  !Setting a sustain time means
  985.                     !R3= effect number (0-63)  !that the new note has
  986.                     !R4= effect value (0-&FFF) !priority on the tune notes
  987.                     !R5= minimum sustain time  !during this time.
  988.                     !    (in 1/50th sec)       ! 
  989.                     !R6<>0 to wait for buffer  ! 
  990.                     !      empty               ! 
  991.                     !      else don't wait     !
  992. --------------------+--------------------------+-----------------------------
  993. ResetParams      07 ! -                        !All parameters are reset
  994.                     !                          !(stereo,counters,effects,...)
  995.                     !                          !and do a FlushOutput.
  996. --------------------+--------------------------+-----------------------------
  997. FlushOutput      08 ! -                        !The current notes on all
  998.                     !                          !channels are cut.
  999. --------------------+--------------------------+-----------------------------
  1000. FreezeOutput     09 !R0= -1 to read output     !R0= previous output status
  1001.                     !        status            !(  0= off i.e. nothing played
  1002.                     !   <>-1 to set            ! <>0= on )
  1003. --------------------+--------------------------+-----------------------------
  1004. UpCallVector     0A !R0= -1 to read upcall     !R0= previous upcall address
  1005.                     !       address            !
  1006.                     !  = -2 to set default     !
  1007.                     !  else set                !
  1008. --------------------+--------------------------+-----------------------------
  1009. MaskVoice        0B !R0= voice number (0-7)    !R0= previous voice status
  1010.                     !R1= -1 to read voice stat !    (0= off, <>0=on)
  1011.                     !  <>-1 to set voice status!The notes are still played
  1012.                     !                          !but not heard for the voice.
  1013. --------------------+--------------------------+-----------------------------
  1014. SongPos          0C !R0= -1 to read sequence ps!R0= previous sequence pos
  1015.                     !  <>-1 to set             !R1= previous pattern pos
  1016.                     !R1= -1 to read pattern pos!    (0-63)
  1017.                     !  <>-1 to set             !If pattern pos is changed
  1018.                     !                          !then the current counter is
  1019.                     !                          !reset to play the tune line
  1020.                     !                          !as soon as possible.
  1021. --------------------+--------------------------+-----------------------------
  1022. TuneControl      0D !R0= -1 to read status     !R0= previous tune status
  1023.                     !  <>-1 to set (lower byte)!    (0= off, <>0= on)
  1024.                     !                          !Off means the tune decoder
  1025.                     !                          !won't let play notes anymore,
  1026.                     !                          !you can still play custom
  1027.                     !                          !notes.
  1028.                     !                          !Current notes still playing.
  1029. --------------------+--------------------------+-----------------------------
  1030. Pause            0E ! -                        !The tune is stopped and
  1031.                     !                          !current notes on tune
  1032.                     !                          !channels cut.
  1033. --------------------+--------------------------+-----------------------------
  1034. Voices           0F !R0= -1 to read hardware   !R0= previous hardware voices
  1035.                     !       voices number      !    number (1,2,4 or 8)
  1036.                     !  <>-1 to set voices      !
  1037.                     !The change is taken into account during next configure.
  1038.                     !Initial value is 4.
  1039. --------------------+--------------------------+-----------------------------
  1040. Wait             10 !R0= voice number (0-7)    !C is set if custom note
  1041.                     !                          !buffer is not empty,
  1042.                     !                          !else clear.
  1043. --------------------+--------------------------+-----------------------------
  1044. IntState         11 ! -                        !C is set if the call has
  1045.                     !                          !interrupted the playing or
  1046.                     !                          !filling routines.
  1047. --------------------+--------------------------+-----------------------------
  1048. NoteInfo         12 ! -                        !R0= address of current notes
  1049.                     !                          !    table (1 word per voice)
  1050.                     !                          !    note is 0 to 1023
  1051.                     !                          !R1= address of current
  1052.                     !                          !    samples table (1 byte per
  1053.                     !                          !    voice)
  1054.                     !                          !    sample is 0 to 63
  1055.                     !                          !R2= address of effects table
  1056.                     !                          !    (1 word per voice)
  1057.                     !                          !    bits 30-31 meaningless
  1058.                     !                          !    bits 16-21 effect nr
  1059.                     !                          !    bits  0-11 effect value
  1060.                     !                          !R3= address of volumes table
  1061.                     !                          !    (1 byte per voice)
  1062.                     !                          !    volume is 0 to 64
  1063. --------------------+--------------------------+-----------------------------
  1064. VuBar            13 !R0= voice number (0-7)    !R1= Vu bar height (0-64)
  1065. --------------------+--------------------------+-----------------------------
  1066. Loop             14 !R0= -1 to read loop contrl!R0= previous loop control
  1067.                     !  <>-1 to set             !    (  0= enabled,
  1068.                     !R1= -1 to read loop flag  !     <>0= disabled )
  1069.                     !  <>-1 to set             !R1<>0 if the tune has looped
  1070.                     !                          !      else not looped
  1071.                     !                          !
  1072.                     !Loop control is initially enabled.
  1073.                     !If a song has looped and the loop is disabled, you can
  1074.                     !continue it using TuneControl.
  1075. --------------------+--------------------------+-----------------------------
  1076. BufferAddress    15 ! -                        !R0= current system hardware
  1077.                     !                          !    buffer address (with
  1078.                     !                          !    output data interleaved)
  1079.                     !                          !    208 bytes per channel
  1080. --------------------+--------------------------+-----------------------------
  1081. VuGravity        16 !R0= -1 to read Vu gravity !R0= previous gravity of Vu
  1082.                     !  <>-1 to set (lower byte)!    bars (0-255)
  1083.                     !Initial value is 2.       !
  1084.                     !The change is taken into account during next configure.
  1085. --------------------+--------------------------+-----------------------------
  1086. SampleRate       17 !R0= -1 to read sample rate!R0= previous sample rate
  1087.                     !  <>-1 to set             !    (0-99) - determines
  1088.                     !                          !    sample output density.
  1089.                     !Original value is 24.     !
  1090.                     !The change is taken into account during next configure.
  1091. --------------------+--------------------------+-----------------------------
  1092. Configure        18 !R0= -1 to reinstall previous
  1093.                     !       configuration      
  1094.                     !  <>-1 to configure the system
  1095.                     !       with new voices number,
  1096.                     !       sample rate, Vu gravity and hardware speed.
  1097. --------------------+--------------------------+-----------------------------
  1098. Params           19 !                          !R0= speed (1-&FFF)
  1099.                     !                          !R1= tempo (1-&FFF)
  1100.                     !                          !R2= counter (0-&FFE)
  1101.                     !The counter varies from 1 to speed-1 at a speed
  1102.                     !according to tempo (50 times a sec for default tempo)
  1103. --------------------+--------------------------+-----------------------------
  1104. TuneInfo         1A ! -                        !R0= tune length
  1105.                     !                          !R1= number of patterns
  1106. --------------------+--------------------------+-----------------------------
  1107. PlaySingle       1B !   R0= -1                 !   Play pattern R1
  1108.                     ! or                       ! or
  1109.                     !   R0<>-1                 !   Play from pos R0 to R1
  1110.                     !                          !
  1111.                     ! and                      !
  1112.                     !   R2= -1 for no loop     !
  1113.                     !     <>-1 to loop         !
  1114.                     !                          !
  1115.                     ! or R0=-1 and R1=-1       ! or Normal play.
  1116.                     !                          !
  1117.                     !                          !The pattern pos is set to 0.
  1118.                     !                          !In the case of playing a
  1119.                     !                          !part of the sequence, the
  1120.                     !                          !current position is set to
  1121.                     !                          !the first pos in that part.
  1122. --------------------+--------------------------+-----------------------------
  1123. DefaultStereo    1C !R0= voice number (0-7)    !R1= previous default stereo
  1124.                     !R1= new default stereo    !position (1 to 7) for
  1125.                     !    position              !voice number R0
  1126.                     !    or 0 to read          !
  1127.                     !                          !
  1128.                     !Initial values are those of the Amiga.
  1129. --------------------+--------------------------+-----------------------------
  1130. InstrData        1D !R0= sample number (1-63)  !The specs for sample R0
  1131.                     !R1= sample data address   !are changed to those on entry
  1132.                     !    or -1 to read         !R1= previous address
  1133.                     !R2= sample length         !R2= previous length
  1134.                     !    or -1 to read         !R3= previous repeat offset
  1135.                     !R3= repeat offset         !R4= previous repeat length
  1136.                     !    or -1 to read         !R5= previous volume
  1137.                     !R4= repeat length         !R6= previous finetune
  1138.                     !    or -1 to read         !    (-8 to 7)
  1139.                     !R5= volume (0-64)         !
  1140.                     !    or -1 to read         !
  1141.                     !R6= finetune (0-&F)       !
  1142.                     !    or -1 to read         !
  1143.                     !R1 to R4 must be 2-byte aligned.
  1144.                     !Put a repeat length of 0 for no repeats.
  1145.                     !Repeat length can't be 2.
  1146.                     !Set bit 31 of R1 if the sample is signed linear.
  1147.                     !The data is not moved i.e. it stays where you put it.
  1148. --------------------+--------------------------+-----------------------------
  1149. HardSpeed        1E !R0= samples output        !R0= previous parameter
  1150.                     !    frequency (in kHz)    !R1= current hardware speed
  1151.                     !    or 0 for 'auto speed' !    (in kHz)
  1152.                     !    or -1 to read         !The buffer filling routine
  1153.                     !                          !output frequency is changed
  1154.                     !                          !to the one on entry
  1155.                     !Initial mode is 24000     !
  1156.                     !The change is taken into account during next configure.
  1157.                     !
  1158.                     !In 'auto speed' mode, the filling routine will try to
  1159.                     !guess the current VIDC frequency for outputting samples
  1160.                     !by averaging the number of calls to it and adjust its
  1161.                     !tables to always have the same real pitch whatever the
  1162.                     !hardware speed is. The 'auto speed' selects one of the
  1163.                     !three following speeds currently:
  1164.                     !
  1165.                     !    24000 kHz (normal modes)
  1166.                     !    25175 kHz (VGA modes)
  1167.                     !    36000 kHz (multi sync modes)
  1168.                     !
  1169.                     !Too bad to have the same clock for graphics and sound!
  1170. --------------------+--------------------------+-----------------------------
  1171. LoopType         1F !R0= loop type             !R0= previous loop type
  1172.                     !   or -1 to read          !    (0 or 1)
  1173.                     !                          !
  1174.                     !Type 0: The loop flag is set if the tune reaches
  1175.                     !        position 0.
  1176.                     !Type 1: The loop flag is set if the tune jumps to
  1177.                     !        a lower position.
  1178. --------------------+--------------------------+-----------------------------
  1179. FillAddress      20 ! -                        !R0= address of buffer filling
  1180.                     !                          !    routine
  1181. --------------------+--------------------------+-----------------------------
  1182.  
  1183. So, with such a tool in the hands of (good) demo and game writers, we hope
  1184. to see more and more demos and games with decent (if not very good) sound,
  1185. and never listen again to the horrible *noises* made by previous (and
  1186. current) lamer samples and SoundTrackers replayers!!!
  1187.  
  1188. Before giving our addresses, we'd like to thank the following people/groups
  1189. for their constructive remarks and bug reports about this player:
  1190.  
  1191.                                  SICK
  1192.  
  1193.                                ARMAXESS
  1194.  
  1195. If you find any bug or have any comment about this player or even Digital
  1196. Symphony, don't hesitate to contact us at one of the addresses below:
  1197.  
  1198.         +----------------------------------------------------+
  1199.         ! You can contact the guys who made this software at !
  1200.         +--------------------------+-------------------------+
  1201.         !    Bernard Jungen        !    Gil Damoiseaux       !
  1202.         !    Friddericht 27        !    Rue du Vivier 153    !
  1203.         !    B-6706 Autelbas       !    B-6730 Rossignol     !
  1204.         !    Belgium               !    Belgium              !
  1205.         !                          !                         !
  1206.         ! E-mail until June 1994:  !                         !
  1207.         !  bju@info.fundp.ac.be    !                         !
  1208.         +--------------------------+-------------------------+
  1209.  
  1210.                   +----------------------------------+
  1211.                   ! John Tytgat                      !
  1212.                   ! Brusselbaan 445                  !
  1213.                   ! B-1600 St.-Pieters-Leeuw         !
  1214.                   ! Belgium                          !
  1215.                   !                                  !
  1216.                   ! E-mail:                          !
  1217.                   !  john.tytgat@esat.kuleuven.ac.be !
  1218.                   +----------------------------------+
  1219.  
  1220.    +-------------------------------------------------------------------+
  1221.    ! You can obtain a fully multi-tasking sound tracker editor, called !
  1222.    ! Digital Symphony, which takes ProTracker, (Octo)MED, Tracker,     !
  1223.    !            Coconizer and Symphony files as input from             !
  1224.    +-------------------------------------------------------------------+
  1225.    !                      Oregan Developments,                         !
  1226.    !                  36 Grosvenor Avenue, Streetly,                   !
  1227.    !                   Sutton Coldfield B74 3PE,                       !
  1228.    !                           England.                                !
  1229.    +-------------------------------------------------------------------+
  1230.  
  1231. © 1992/1994 B. Jungen & G. Damoiseaux (members of BASS).
  1232.